/*
 ------------------------------------------------------------------------------
 Copyright (C) 2006-2007 Team Blur.

 This file is part of the Quantum Engine source code.

 The Quantum Engine source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The Quantum Engine source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the Quantum Engine source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


#include "gamelib.h"


odJointMat	jointMat_identity(mat3_identity, vec3_origin);


/*
 ==================
 odJointMat::ToMat3
 ==================
*/
odMat3 odJointMat::ToMat3 (void) const {

	return odMat3(rotation[0], rotation[1], rotation[2]);
}

/*
 ==================
 odJointMat::ToVec3
 ==================
*/
odVec3 odJointMat::ToVec3 (void) const {

	return odVec3(translation[0], translation[1], translation[2]);
}

/*
 ==================
 odJointMat::ToString

 This is just a convenience function for printing joint matrices
 ==================
*/
const char *odJointMat::ToString (int precision) const {

	return Str_FromFloatArray(ToFloatPtr(), 12, precision);
}
